package cn.nebula.music.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import cn.nebula.music.dao.CombinationDAO;
import cn.nebula.music.domain.Combination;

@Component
public class StringToCombinationConverter implements Converter<String,Combination>{

	
	@Autowired
	private CombinationDAO combinationDAO;

	@Override
	public Combination convert(String source) {
		return combinationDAO.findCombinationById(Integer.valueOf(source));
	}
	
	
}
